<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>秒杀实例</title>
    <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <form class="navbar-form navbar-left" role="search" name="myform">
        <input type="text" name="number" id="number" value="">
        <button type="button" onclick="formSubmit()" class="btn btn-default">提交1</button>
    </form>
</body>
<script src="/js/app.js"></script>
<script>
    $.ajaxSetup({
        headers: {
            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
        }
    });
    function formSubmit(){
        var number=myform.number.value;
        // var password=myform.password.value;
        // var age=myform.age.value;
        // var sex=myform.sex.value;
        // if(username.length == ''){
        //     alert('buneng');
        // }
        // console.log(username);
        // console.log(password);
        // console.log(age);
        // console.log(sex);
        $.post('/index/front/secKill',
            {
                number:number
            },function(data){
                console.log(data);
                // alert(data);
            })
    }
</script>
</html>